<div class="tpl-portlet-components" xmlns:th="http://www.thymeleaf.org">
    <div class="portlet-title">
        <div class="caption font-green bold">
            评论列表
        </div>
        <div class="tpl-portlet-input tpl-fz-ml">
            <div class="portlet-input input-small input-inline">
                <div class="input-icon right">
                    <i class="am-icon-search"></i>
                    <input type="text" class="form-control form-control-solid" placeholder="搜索..."></div>
            </div>
        </div>


    </div>
    <div class="tpl-block">

        <div class="am-g">
            <div class="am-u-sm-12">
                <form class="am-form">
                    <table class="am-table am-table-striped am-table-hover table-main">
                        <thead>
                        <tr>
                            <th class="table-check"><input type="checkbox" id="chkAll_comment"
                                                           onchange="setCheckBox('chkAll_comment','chk_comment')"
                                                           class="tpl-table-fz-check"></th>
                            <th class="table-id">序号</th>
                            <th class="table-title">博客标题</th>
                            <th class="table-author am-hide-sm-only">评论者邮箱</th>
                            <th class="table-date am-hide-sm-only">评论内容</th>
                            <th class="table-set">日期</th>
                            <th class="table-set">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <!--/*@thymesVar id="comment" type="blog.ruan.ruanblog.entity.Blog"*/-->
                        <tr th:each="comment :${commentVOList}">
                            <td><input type="checkbox" class="chk_comment" th:attr="objId=${comment.id}"></td>
                            <td th:text="${commentStat.index + 1}">1</td>
                            <td><a href="#" th:text="${comment.blogTitle}"></a></td>
                            <td class="am-hide-sm-only" th:text="${comment.email}"></td>
                            <td class="am-hide-sm-only" th:text="${comment.content}"></td>
                            <td class="am-hide-sm-only" th:text="${comment.createDate}"></td>
                            <td>
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span
                                                class="am-icon-pencil-square-o"></span> 编辑
                                        </button>
                                        <button type="button"
                                                class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"
                                                th:onclick="'deleteObj(\'/comment/delete/'+${comment.id}+'\',\'/admin/comment/list\')'">
                                            <span class="am-icon-trash-o"></span> 删除
                                        </button>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="am-cf">
                        <div class="am-fr">
                            <ul class="am-pagination tpl-pagination">
                                <li><a th:onclick="'loadMainBody(\'/admin/comment/list?page=0\')'">«</a></li>
                                <!--<li class="am-active"><a href="#">1</a></li>-->
                                <li th:each="i : ${#numbers.sequence(1,totalPage,1)}"
                                    th:id="'page'+${i}">
                                    <a th:text="${i}"
                                       th:onclick="'loadMainBody(\'/admin/comment/list?page='+${i-1}+'\')'">1</a>
                                </li>
                                <li>
                                    <a th:onclick="'loadMainBody(\'/admin/comment/list?page='+${totalPage-1}+'\')'">»</a>
                                </li>
                            </ul>
                            <script th:inline="javascript" type="text/javascript">
                                var id = [[${currentPage+1}]];
                                $("#page" + id).attr("class", "am-active");
                            </script>
                        </div>
                    </div>
                    <hr>

                </form>
            </div>

        </div>
    </div>
    <div class="tpl-alert"></div>
</div>

